<!-- 发货页面 订单列表模板 -->
<div class="tablelist">
	{{if data.order_tab==1}}
    <button class="btn btn-primary muchBtn">小区批量发货</button>
    <button class="btn btn-primary fhygBtn">发货订单数预估查询</button>
    {{/if}}
    {{each data.records as user index}}
    <div class="list-hd">
        <span class="blue1">用户名：{{user.username}}</span>
        <span class="blue1">用户账号：<a href="#order/adminlist/{{user.user_id}}">{{user.user_account}}</a></span>
    </div>
    <div class="list-bd">
        <div class="orderbox">
            {{each user.orderList as order index}}
            <div class="order-hd">
                <ul class="ul-order">
                    <li>订单编号：
                    {{if order.goods_label_type==2}}
                    <a href="#order/subscribe/{{order.id}}">
                    {{else}}
                    <a href="#order/order//{{order.id}}">
                    {{/if}}
                    {{order.id}}</a></li>
                    <li>下单时间：{{order.add_time}}</li>
                    <li>付款时间：{{order.pay_time}}</li>
                </ul>
            </div>
            <div class="order-bd">
                <ul>
                    {{each order.orderDetailsVoList as details index}}
                    <li>
                        <div class="fm-goods-info">
                            <div class="fm-goods-img">
                                <!-- <a href="javascript:void(0);"> -->
                                <img src="{{data.url}}/{{details.goods_main_photo_url}}" />
                                <!--</a>-->
                            </div>
                            <div class="fm-goods-con">
                                <p class="maintitle">
                                    <!-- <a href="javascript:void(0);">{{details.goods_name}}</a>-->
                                    {{details.goods_name}}
                                </p>
                                <p class="subtitle">
                                    {{details.goods_subhead}}
                                </p>
                                {{ if order.goods_label_type==1}}
                                <p>
                                    <span class="price">￥{{details.goods_current_price}} </span><span class="num"> x {{details.goods_num}}</span>
                                </p>
                                <p>
                                    <span class="num">实付款 </span><span class="price"> ￥{{order.order_price}}（含运费 ￥{{order.ship_price}}）</span>
                                </p>
                                {{/if}}
                            </div>
                        </div>
                        <div class="fm-column" style="width:16%;">
                            	商品类型：{{order.goods_label_name}}
                        </div>
                        <div class="fm-column" style="width:17%;">
                            {{if data.order_tab==2}}
                            	{{if order.goods_label_type==2}}
                            		<p>配送时间：{{order.delivery_time}}</p>
                            	{{/if}}
                            <p>发货时间：{{order.deliver_time}}</p>
                            {{else}} {{if order.goods_label_type==2}}
                            <p>配送时间：{{order.delivery_time}}</p>
                            {{else}}
                            <p>配送时间：——</p>
                            {{/if}} {{/if}} {{ if order.remark != "" }}
                            <p>
                            	<div class="fl">备注：</div>
                            	<div class="memobox fl">
		                    		<a href="javascript:void(0);" class="memolink"  data-placement="top" data-content="{{order.remark}}">
		                    			{{order.remark}}
		                    		</a>		
		                    	</div>
                                <div class="clearit"></div>
                            </p>
                            {{/if}}
                            {{if order.habit_remark != "" }}
                            <p>
                            	<div class="fl">消费习惯：</div>
                            	<div class="memobox fl">
		                    		<a href="javascript:void(0);" class="memolink"  data-placement="top" data-content="{{order.habit_remark}}">
		                    			{{order.habit_remark}}
		                    		</a>		
		                    	</div>
                                <div class="clearit"></div>
                            </p>
                            {{/if}}
                            {{if order.deliver_remark != "" }}
                            <p>
                            	<div class="fl">配送需求：</div>
                            	<div class="memobox fl">
		                    		<a href="javascript:void(0);" class="memolink"  data-placement="top" data-content="{{order.deliver_remark}}">
		                    			{{order.deliver_remark}}
		                    		</a>		
		                    	</div>
                                <div class="clearit"></div>
                            </p>
                            {{/if}}
                        </div>
                        <div class="fm-column" style="width:25%;">
                            <P>配送小区：{{order.community_name}}</P>
                            <p>收货地址：{{order.addVo.area_info}}</p>
                            <p>收件人：{{order.addVo.user_name}}</p>
                            <p>联系电话：{{order.addVo.mobile}}</p>
                        </div>
                        <div class="fm-column" style="width:10%;">
                            {{if order.deliver_status==1}}
                            	<button class="btn btn-primary deliverBtn" data-order-id="{{order.id}}" data-detail-id={{details.id}} data-goods-name="{{details.goods_name}}" data-goods-num="{{details.goods_num}}" data-goods-type={{order.goods_label_type}} type="button">发货</button>
                            	{{if order.goods_label_type==2}}
                            	<a href="javascript:void(0);" class="cancelDeliverBtn" data-order-id="{{order.id}}" data-detail-date="{{order.delivery_time}}" > 取消发货</a>
                            	{{/if}}
                            {{else}} 
                            	 <p>已发货</p>
                            {{/if}}
                        </div>
                        <div class="clearit"></div>
                    </li>
                    {{/each}}
                </ul>
            </div>
            {{/each}}
        </div>
    </div>
    {{/each}}
</div>
